package com.library.service;

import com.library.entity.Questions;

import java.util.List;

import com.baomidou.mybatisplus.service.IService;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author 至尊伍人组
 * @since 2018-09-30
 */
public interface IQuestionsService extends IService<Questions> {
	/**
	 * <p>根据课程Id创建试卷单选题</p>
	 * @param lessonId
	 * @return List<Questions>
	 */
	List<Questions> createPaper0(int lessonId);
	/**
	 * <p>根据课程Id创建试卷多选题</p>
	 * @param lessonId
	 * @return List<Questions>
	 */
	List<Questions> createPaper1(int lessonId);
	/**
	 * <p>根据课程删除题目</p>
	 * @param questionsId
	 * @return boolean
	 */
	boolean deleteQuestion(int questionsId);
	/**
	 * <p>添加题目</p>
	 * @param lessonId
	 * @return boolean
	 */
	boolean addQuestion(Questions questions);
	
	/**
	 * <p>更新题目</p>
	 * @param questions
	 * @return boolean
	 */
	boolean updateQuestion(Questions questions);
	
	/**
	 * <p>根据课程编号分页查询题目</p>
	 * @param current
	 * @param size
	 * @param lessonId
	 * @return List<Questions>
	 */
	List<Questions> showPageQuestions(int page, int size,int lessonId);
	
	/**
	 * <p>获取记录总数</p>
	 * @param lessonId
	 * @param readerId
	 * @return int
	 */
	int getCount(int lessonId,int readerId);
}
